package com.tianji.promotion.service;

import com.tianji.promotion.util.MyLock;
import org.springframework.stereotype.Service;

@Service
public class DemoService {

    @MyLock(name="demo", leaseTime = 10)
    public String demo(){
        try{
            Thread.sleep(5000);
        }catch(Exception e){
            e.printStackTrace();
        }
        return "success";
    }
}
